#!/bin/bash
for iterator in `seq 1 1`
do
   	echo "Iterator $iterator :"
	sed "1 i\LineNumber = $iterator ;" HM_model.m > step1.m
	math -noprompt -script step1.m
	sed "1 i\LineNumber = $iterator ;" ReadingDataTorso.m > step2.m
	math -noprompt -script step2.m
	sed "1 i\LineNumber = $iterator " s3.m > step3.m
	matlab -nojvm -nodesktop -r "step3.m"
done
rm step1.m step2.m step3.m
